package com.jackeysun.app_util

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.jackeysun.app_util.databinding.ActivityMainBinding
import com.jackeysun.util.*
import com.jackeysun.util.Application.mApplication

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val mainBinding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(mainBinding.root)

        mApplication = this@MainActivity

        currentFocus

        mainBinding.toggleSoftInput.setOnClickListener {
            mainBinding.et.toggleSoftInput()
        }

        mainBinding.bindSoftInput.setOnClickListener {
            mainBinding.et.bindSoftInput()
        }

        mainBinding.unbindSoftInput.setOnClickListener {
            mainBinding.et.unbindSoftInput()
        }
        mainBinding.forceHideSoftInput.setOnClickListener {
            forceHideSoftInput()
        }

    }
}